package com.qiche.controller.mgr;

import com.qiche.aspect.Result;
import com.qiche.dto.CardLinkDto;
import com.qiche.model.GiftPackage;
import com.qiche.service.CardLinkService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 卡券关联 管理控制器
 * @author Linzewen
 *
 * 2018年2月27日
 */
@RestController
@RequestMapping("/cardLinks")
public class CardLinkController {
	@Resource
	private CardLinkService cardLinkService;

	/**
	 * 保存卡券关联对应信息
	 * @param
	 * @return
	 */
	@RequestMapping(value = "/setGifts")
	public Result<GiftPackage> setGifts(@RequestBody CardLinkDto cardLinkDto) {

		 return cardLinkService.setGiftLinks(cardLinkDto);
	}
}
